home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / CDTools / GoFetch! / arexx / StandardScripts / StartGoFetch.miami < prev    next >
Text File  |  1998-11-03  |  1KB  |  61 lines

  1. /*
  2. ** GoFetch Arexx Script
  3. ** Written by Ian Chapman/Marc Bradshaw
  4. ** for Zeus Developments
  5. **
  6. ** V1.0 29.10.99
  7. **
  8. ** This script can be used with MiamiDX to automatically
  9. ** start Go Fetch! and tell it go when you go online.
  10. */
  11.  
  12. /*
  13. ** Arguments:   (see Go Fetch documentation for in-depth descriptions)
  14. ** MiamiStart.rexx <path to gofetch>
  15. ** e.g.
  16. ** MiamiStart.rexx work:comms/gofetch!/gofetch!
  17. */
  18.  
  19. Options Results
  20.  
  21. PortName = 'GOFETCH'
  22.  
  23. CommandArg = Arg(1)
  24.  
  25. IF ~SHOW('LIBRARIES','rexxsuport.library') THEN
  26.     Call ADDLIB('rexxsupport.library',10,-30,0)
  27.  
  28. If ~Exists(CommandArg) Then Do
  29.     Say 'Given Path to GoFetch! Was Invalid.'
  30.     Exit 1
  31. End
  32.  
  33. WasLoaded=0
  34. If ~Show('P',PortName) Then Do
  35.     WasLoaded=1
  36.     Address Command 'RUN <>NIL: 'CommandArg
  37.     Do I=1 to 15
  38.         Call Delay(100)
  39.         If Show('P',PortName) THEN I=15
  40.     End
  41. End
  42.  
  43. If ~Show('P',PortName) Then Do
  44.     Say 'Error Loading GoFetch! Please Investigate.'
  45.     Exit 1
  46. End
  47.  
  48. Interpret 'Address 'PortName' profiles'
  49. Number = RC
  50.  
  51. If Number = 0 Then Do
  52.     /* There are no waiting files - Exit */
  53.     If WasLoaded=0 Then
  54.         Interpret 'Address 'PortName' QUIT'
  55.     End
  56. Else Do
  57.     /* There is stuff to do, Do it */
  58.     Interpret 'Address 'PortName' gofetch'
  59. End
  60.  
  61.